Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@trust/keyto
Advanced tools
A utility for translating cryptographic keys between representations
A utility for translating cryptographic keys between representations.
Keyto is pronounced 'key-to'.
Full project documentation is available here.
$ npm install @trust/keyto --save
Translate Private PEM to Public JWK:
const keyto = require('@trust/keyto')
let pemPrivate = getPrivatePemStringSomehow()
let jwk = getPublicJwkSomehow()
// String data can either be passed in directly:
let key = keyto.from(pemPrivate, 'pem').toJwk('public')
// Or can be passed in as an object instead:
let key = keyto.from({ key: pemPrivate }, 'pem').toJwk('public')
assertEqual(jwk, key)
Translate Private Hex (Blockchain) Key to PKCS8 Public PEM:
const keyto = require('@trust/keyto')
let blk = getPrivateBlockchainHexStringSomehow()
let pemPublic = getPublicPemSomehow()
let key = keyto.from(blk, 'blk').toString('pem', 'public_pkcs8')
assertEqual(pemPublic, key)
args:
format:
Format can be any of these: 'pem', 'jwk' or 'blk'.
args:
selector:
Selector can be any of these: 'public', 'private'.
args:
format:
Format can be any of these: 'pem', 'jwk' or 'blk'.
selector:
Selector can be any of these: 'public', 'private', 'public_pkcs1', 'public_pkcs8', 'private_pkcs1' or 'private_pkcs8'.
PRs accepted.
Small note: If editing the README, please conform to the standard-readme specification.
MIT © 2017-2020 Greg Linklater
FAQs
A utility for translating cryptographic keys between representations
We found that @trust/keyto demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.